package com.hornsun.authorization;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


@Component
public class HeartBeatListener implements ServletContextListener {


    @Autowired
    private AsyncTaskService asyncTaskService;


    @Override
    public void contextInitialized(ServletContextEvent sce) {

        asyncTaskService.heartBeatHandler();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }


}
